# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=atlantik
# 3.5.10 is 15 years old but the latest commit is actually modern and even updated to Qt6
pkgver=3.5.10_git20230928
pkgrel=2
_commit="688c8fcc65d36e9698b7662b4c0610d1a79c8188"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/atlantik/"
pkgdesc="KDE client for playing Monopoly-like games on the monopd network"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kconfig5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	kdoctools5-dev
	ki18n5-dev
	kiconthemes5-dev
	knotifications5-dev
	knotifyconfig5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	libkdegames-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/games/atlantik.git"
source="$pkgname-$_commit.tar.gz::https://invent.kde.org/games/atlantik/-/archive/$_commit/atlantik-$_commit.tar.gz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests
builddir="$srcdir/$pkgname-$_commit"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9f05e83bad6cc97f757fac2e1650d70052db934fb9b83b8d59f203aa64e7f27bce880fa2cee4120299d7e7091b7435d464280c4c4f8820edd9662dd8c9d7f2fa  atlantik-688c8fcc65d36e9698b7662b4c0610d1a79c8188.tar.gz
"
